<template>
  <div class="">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>商品管理</el-breadcrumb-item>
      <el-breadcrumb-item>商品分类</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图区域 -->
    <el-card>
      <el-row :gutter="20">
        <el-col :span=8>
          <el-input placeholder="请输入内容">
            <el-button slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </el-col>
        <el-col :span=4>
          <el-button type="primary">
            添加商品
          </el-button>
        </el-col>
      </el-row>

      <!-- 表格 -->
      <tree-table :data="catelist" :columns="columns">

      </tree-table>
      <!-- 分页区域 -->
    </el-card>



  </div>
</template>

<script>
 //import '../assets/js/cate.js'
  export default {
   data (){
     return {
       //查询条件
       queryInfo : {
         type : 3,
         pagenum : 1,
         pagesize : 5
       },
       //数据列表
       catelist : [
         
       ],
       //总数据
       total : 0,
       //为table制定列的定义
       columns : [
          {
            label: '分类名称',
            prop: 'name'
          }
       ]
     }
   },
   created(){
     this.getCateList();
   },
   methods : {
     //请求商品表格数据
    async getCateList(){
      // const {data : res} = await this.$http.get('aaa' , {params:this.queryInfo})
      // if(res.meta.status !== 200){
      //   return this.$msg.error("获取商品表格失败");
      //   //把数据列表赋值给catelist
      //   this.catelist = res.data.result
      //   this.total = res.data.total
      // }
    }
   }
  }
</script>

<style lang="less" scoped>
  .el-breadcrumb{
     line-height: 30px;
  }
</style>
